package engine.gui;

import engine.game.Manager;
import engine.graphics.FontManager;

public class Panel extends ParentObject{

	private static final long serialVersionUID = 1L;

	private Label label ; 
	
	public Panel(Manager m, int x, int y, int w, int h) {
		super(m, x, y, w, h);
		this.label = new Label(this.getManager(), this, "");
		this.label.setFontName(FontManager.S_FONT_13); 
		this.addNewChild("panelLabel", this.label);
	}

	public Panel(Manager m, ParentObject parent, int w, int h){
		this(m, (int)parent.getX(), (int)parent.getY(), w, h); 
	}
	public Panel(Manager m, ParentObject parent, int w, int h, String caption){
		this(m, (int)parent.getX(), (int)parent.getY(), w, h);
		this.label.setCaption(caption);
	}
	
	public void setFontName(String fName){
		this.label.setFontName(fName);
	}
	
	public void setCaption(String caption){
		this.label.setCaption(caption);
	}
	
	public void init(){
		super.init(); 
		this.disableHovering(); 
		this.disableClicking(); 
	}

	public void render(){
		super.render();
	}
	
	public void padding(int paddingLeft, int paddingTop){
		super.padding(paddingLeft, paddingTop); 
		this.labelPadding(paddingLeft, paddingTop);
	}
	
	public void labelPadding(int paddingLeft, int paddingTop) {
		this.label.padding(paddingLeft, paddingTop);
	}
}
